package com.example.qihuibao.dao

import androidx.room.*
import com.example.qihuibao.bean.RspQueryCanteenInfoBean
import com.example.qihuibao.bean.RspQueryEnterpriseInfoBean

@Dao
interface CanteenInfoDao {
    @Query("SELECT * FROM CanteenInfo WHERE CantID IN (:field_canteenId)")
    fun queryByCanteenId(field_canteenId: String): RspQueryCanteenInfoBean?

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun save(bean: RspQueryCanteenInfoBean) : Long
//
////    @Insert
//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    fun saveList(users: List<UserInfo>) : List<Long>?
//
    @Query("SELECT * FROM CanteenInfo")
    fun queryAll(): List<RspQueryCanteenInfoBean>?
//
//    @Delete
//    fun delete(userInfo: UserInfo)
//
    @Query("DELETE FROM CanteenInfo")
    fun deleteAll()
}